var express = require('express');
var app = express();
var path = require('path');
var http = require('http')
var server = http.createServer(app)
var bodyParser = require('body-parser')
var cors = require('express-cors')


app.use(cors({
    allowedOrigins: [
        'localhost:*'
    ]
}));

app.use('/', express.static('./'));

app.use(bodyParser.urlencoded({
    extended: false
}));

var startServer = function () {
    var port = 8000;
    server.listen(port);
};


module.exports = function (gulp) {
    gulp.task('startServer', startServer);
};